class Paddle {
  int w;
  int xpos, ypos;
  float alpha;

  void init(int x) {
    this.w = 40;
    this.xpos = x;
    this.ypos = (int)(height * .9);
    this.alpha = 1.0;
  }

  void update() {
    if(alpha == 0) return;
    if(mouseX == xpos) return;
    //alpha *= 0.999;
    if(alpha < 0.01) alpha = 0;
  }

  void drawOldSchool(GL gl) {
    gl.glColor3f(alpha, alpha, alpha);
    //gl.glRecti(xpos,ypos,xpos+w,ypos+10);
    gl.glVertex2i(xpos-w,ypos-5);
    gl.glVertex2i(xpos+w,ypos-5);
    gl.glVertex2i(xpos+w,ypos+5);
    gl.glVertex2i(xpos-w,ypos+5);
  }
}

